package com.xyz.app.controller;

import com.free.common.vo.ResultModel;
import com.free.ext.mybatis.model.entity.PageResponseModel;
import com.xyz.service.AnnounceInfoService;
import com.xyz.service.CustomerInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping(value = "/custinfo")
public class CustInfoMessageController {

    @Autowired
    private CustomerInfoService custInfoService;

    @Autowired
    private AnnounceInfoService announceInfoService;


    @RequestMapping(value = "/infolist.json")
    @ResponseBody
    public PageResponseModel infoList(Integer pageNo, Integer pageSize){
        return custInfoService.messageList(pageNo, pageSize);
    }

    @RequestMapping(value = "/announcelist.json")
    @ResponseBody
    public PageResponseModel announceList(Integer pageNo, Integer pageSize){
        return announceInfoService.messageList(pageNo, pageSize);
    }

}
